#define _CRT_SECURE_NO_WARNINGS 
#include <stdio.h>
int my_strlen1(char* ch)
{
	if (*ch != '\0')
		return 1 + my_strlen1(ch + 1);
	else return 0;
}
int my_strlen2(char* ch)
{
	int count = 0;
	while (1)
	{
		if (*ch != '\0')
		{
			count++;
			ch++;
		}
		else break;
	}
	return count;
}
int main()
{
	char ch[100];
	scanf("%s", ch);
	printf("%d\n%d", my_strlen1(ch), my_strlen2(ch));
	return 0;
}